1. Field of the Invention
This invention relates generally to computer software. More particularly, the invention relates to a system and method for automatically analyzing virtual machine bytecode of a software application and adding additional bytecode operable to determine information regarding database access performed by the software application.
2. Description of the Related Art
Software developers typically create the source code for software applications in a high-level programming language by writing textual program statements that specify the application's functionality. The source code may then be compiled into executable machine code that can be executed by a physical processor. This executable machine code is also referred to as native code because it is formatted so that it executes on a specific type of processor using that processor's instruction set. Thus, native code is typically not portable across different types of computing devices, e.g., devices that use different types of processors.
An alternative method of program execution is to compile the source code into an intermediate form of code called bytecode, which is a binary representation of program instructions suitable for execution on a specific type of virtual machine. The virtual machine itself is implemented in software and is executed by the processor of the physical computing device. A software application that has been compiled into bytecode instructions may be executed on the virtual machine, e.g., by the virtual machine dynamically interpreting the bytecode instructions. Alternatively, another level of compilation may be performed. For example, some virtual machine runtime environments perform just-in-time compilation to compile bytecode into native code during execution of the software application.
The virtual machine provides a layer of abstraction between the compiled bytecode and the underlying hardware platform and operating system. Thus, compiling a software application into bytecode rather than native code may reduce the software application's dependence on specific hardware. For example, the same bytecode may be executed on several different types of computing platforms as long as a virtual machine to execute the bytecode is available on all the respective computing platforms.
Software application code that has been compiled into bytecode may be operable to perform any of various kinds of functions. Many software applications utilize a database to store or manage data for various purposes. In particular, many software applications connect to relational databases in order to manage data.